import 'package:aidw_ui/pages/about/view.dart';
import 'package:aidw_ui/pages/login/view.dart';
import 'package:aidw_ui/pages/startup/view.dart';
import 'package:aidw_ui/pages/welcome/view.dart';
import 'package:aidw_ui/route_get.dart';
import 'package:aidw_ui/string_res/str_res_keys.dart';
import 'package:aidw_ui/widget/appbar/fluid_nav_bar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'logic.dart';

class HomePage extends StatelessWidget {
  final logic = Get.find<HomeLogic>();
  final state = Get.find<HomeLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: PageView(
          physics: NeverScrollableScrollPhysics(),
          children: <Widget>[
            WelcomePage(),
            Text('敬请期待'),
            Text('敬请期待'),
            LoginPage(),
          ],
          controller: logic.pageController,
          onPageChanged: logic.handleTabPageChanged,
        ),
      ),
      bottomNavigationBar: FluidNavBar(
        onChange: logic.handleBottomBarPageChanged,
      ),
    );
  }
}
